<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::BoxBasedShrinkingStrategy&lt; Problem &gt; Struct Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">BoxBasedShrinkingStrategy</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="structshark_1_1_box_based_shrinking_strategy-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle"><div class="title">shark::BoxBasedShrinkingStrategy&lt; Problem &gt; Struct Template Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Takes q boxx constrained QP-type problem and implements shrinking on it.  
 <a href="structshark_1_1_box_based_shrinking_strategy.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_box_based_shrinking_strategy_8h_source.html">shark/Algorithms/QP/BoxBasedShrinkingStrategy.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::BoxBasedShrinkingStrategy&lt; Problem &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="structshark_1_1_box_based_shrinking_strategy__inherit__graph.png" border="0" usemap="#ashark_1_1_box_based_shrinking_strategy_3_01_problem_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_box_based_shrinking_strategy_3_01_problem_01_4_inherit__map" id="ashark_1_1_box_based_shrinking_strategy_3_01_problem_01_4_inherit__map">
<area shape="rect" title="Takes q boxx constrained QP&#45;type problem and implements shrinking on it." alt="" coords="5,79,181,120"/>
<area shape="rect" title=" " alt="" coords="58,5,128,31"/>
<area shape="poly" title=" " alt="" coords="96,46,96,79,90,79,90,46"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a0d3ff342a04259d796737f143756c170" id="r_a0d3ff342a04259d796737f143756c170"><td class="memItemLeft" align="right" valign="top">typedef Problem::QpFloatType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#a0d3ff342a04259d796737f143756c170">QpFloatType</a></td></tr>
<tr class="separator:a0d3ff342a04259d796737f143756c170"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75302b71e238815a8b5c8dc663add783" id="r_a75302b71e238815a8b5c8dc663add783"><td class="memItemLeft" align="right" valign="top">typedef Problem::MatrixType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#a75302b71e238815a8b5c8dc663add783">MatrixType</a></td></tr>
<tr class="separator:a75302b71e238815a8b5c8dc663add783"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e49b05f112110b820b466c39ac9042e" id="r_a8e49b05f112110b820b466c39ac9042e"><td class="memItemLeft" align="right" valign="top">typedef Problem::PreferedSelectionStrategy&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#a8e49b05f112110b820b466c39ac9042e">PreferedSelectionStrategy</a></td></tr>
<tr class="separator:a8e49b05f112110b820b466c39ac9042e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a80dbbcad0a023740c8d0bfa4a6ac4a99" id="r_a80dbbcad0a023740c8d0bfa4a6ac4a99"><td class="memTemplParams" colspan="2">template&lt;class ProblemT &gt; </td></tr>
<tr class="memitem:a80dbbcad0a023740c8d0bfa4a6ac4a99"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#a80dbbcad0a023740c8d0bfa4a6ac4a99">BoxBasedShrinkingStrategy</a> (ProblemT &amp;problem, bool <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#aaa20fc55d3f28d930e26ca577621c44d">shrink</a>=true)</td></tr>
<tr class="separator:a80dbbcad0a023740c8d0bfa4a6ac4a99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bddc03ff11fb5f104e2f1000c7b2093" id="r_a1bddc03ff11fb5f104e2f1000c7b2093"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#a1bddc03ff11fb5f104e2f1000c7b2093">updateSMO</a> (std::size_t i, std::size_t j)</td></tr>
<tr class="separator:a1bddc03ff11fb5f104e2f1000c7b2093"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa20fc55d3f28d930e26ca577621c44d" id="r_aaa20fc55d3f28d930e26ca577621c44d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#aaa20fc55d3f28d930e26ca577621c44d">shrink</a> (double epsilon)</td></tr>
<tr class="separator:aaa20fc55d3f28d930e26ca577621c44d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adff09578370110d58328cf69e965a5fe" id="r_adff09578370110d58328cf69e965a5fe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#adff09578370110d58328cf69e965a5fe">unshrink</a> ()</td></tr>
<tr class="memdesc:adff09578370110d58328cf69e965a5fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unshrink the problem.  <br /></td></tr>
<tr class="separator:adff09578370110d58328cf69e965a5fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9a1833825c43ee5492fde78d85cf0c5" id="r_af9a1833825c43ee5492fde78d85cf0c5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#af9a1833825c43ee5492fde78d85cf0c5">setShrinking</a> (bool shrinking)</td></tr>
<tr class="separator:af9a1833825c43ee5492fde78d85cf0c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e718159c7a2ae9bb6e828792da068e3" id="r_a6e718159c7a2ae9bb6e828792da068e3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#a6e718159c7a2ae9bb6e828792da068e3">setInitialSolution</a> (RealVector const &amp;alpha, RealVector const &amp;gradient, RealVector const &amp;gradientEdge)</td></tr>
<tr class="memdesc:a6e718159c7a2ae9bb6e828792da068e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Define the initial solution for the iterative solver.  <br /></td></tr>
<tr class="separator:a6e718159c7a2ae9bb6e828792da068e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad81b0fa8a8c66781fcfdc126c49cd27e" id="r_ad81b0fa8a8c66781fcfdc126c49cd27e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#ad81b0fa8a8c66781fcfdc126c49cd27e">setInitialSolution</a> (RealVector const &amp;alpha)</td></tr>
<tr class="memdesc:ad81b0fa8a8c66781fcfdc126c49cd27e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Define the initial solution for the iterative solver.  <br /></td></tr>
<tr class="separator:ad81b0fa8a8c66781fcfdc126c49cd27e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28001ad176039adccb83869d0b0867f8" id="r_a28001ad176039adccb83869d0b0867f8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#a28001ad176039adccb83869d0b0867f8">deactivateVariable</a> (std::size_t i)</td></tr>
<tr class="memdesc:a28001ad176039adccb83869d0b0867f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the i-th example from the problem.  <br /></td></tr>
<tr class="separator:a28001ad176039adccb83869d0b0867f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb019d7a60a63b0555442f946fc346e3" id="r_abb019d7a60a63b0555442f946fc346e3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#abb019d7a60a63b0555442f946fc346e3">scaleBoxConstraints</a> (double factor, double variableScalingFactor)</td></tr>
<tr class="memdesc:abb019d7a60a63b0555442f946fc346e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scales all box constraints by a constant factor and adapts the solution by scaling it by the same factor.  <br /></td></tr>
<tr class="separator:abb019d7a60a63b0555442f946fc346e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab68691e44171a2cc4659c19c9a0125d6" id="r_ab68691e44171a2cc4659c19c9a0125d6"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#ab68691e44171a2cc4659c19c9a0125d6">setLinear</a> (std::size_t i, double newValue)</td></tr>
<tr class="memdesc:ab68691e44171a2cc4659c19c9a0125d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">adapts the linear part of the problem and updates the internal data structures accordingly.  <br /></td></tr>
<tr class="separator:ab68691e44171a2cc4659c19c9a0125d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a123fe7062f93d420c0e0350500791bfa" id="r_a123fe7062f93d420c0e0350500791bfa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#a123fe7062f93d420c0e0350500791bfa">flipCoordinates</a> (std::size_t i, std::size_t j)</td></tr>
<tr class="memdesc:a123fe7062f93d420c0e0350500791bfa"><td class="mdescLeft">&#160;</td><td class="mdescRight">swap indizes (i,j)  <br /></td></tr>
<tr class="separator:a123fe7062f93d420c0e0350500791bfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class Problem&gt;<br />
struct shark::BoxBasedShrinkingStrategy&lt; Problem &gt;</div><p>Takes q boxx constrained QP-type problem and implements shrinking on it. </p>
<p>Given a QP-type-Problem, implements a strategy which allows to efficiently shrink and unshrink the problem. If a value of the QP has an active box constraint, it is shrinked from the problem when currently there is no possible step using that variable that leads to a gain. This is problem dependent as this might involve consideration of additional constraints. Therefore, every Problem must implement the method testShrinkVariable. </p>

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00047">47</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a75302b71e238815a8b5c8dc663add783" name="a75302b71e238815a8b5c8dc663add783"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75302b71e238815a8b5c8dc663add783">&#9670;&#160;</a></span>MatrixType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef Problem::MatrixType <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;<a class="el" href="_mc_svm_linear_8cpp.html#a88ab98d46276376a56c2a396842cd58e">::MatrixType</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00050">50</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

</div>
</div>
<a id="a8e49b05f112110b820b466c39ac9042e" name="a8e49b05f112110b820b466c39ac9042e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e49b05f112110b820b466c39ac9042e">&#9670;&#160;</a></span>PreferedSelectionStrategy</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef Problem::PreferedSelectionStrategy <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::PreferedSelectionStrategy</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00051">51</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

</div>
</div>
<a id="a0d3ff342a04259d796737f143756c170" name="a0d3ff342a04259d796737f143756c170"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d3ff342a04259d796737f143756c170">&#9670;&#160;</a></span>QpFloatType</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef Problem::QpFloatType <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::QpFloatType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00049">49</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a80dbbcad0a023740c8d0bfa4a6ac4a99" name="a80dbbcad0a023740c8d0bfa4a6ac4a99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a80dbbcad0a023740c8d0bfa4a6ac4a99">&#9670;&#160;</a></span>BoxBasedShrinkingStrategy()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
<div class="memtemplate">
template&lt;class ProblemT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::BoxBasedShrinkingStrategy </td>
          <td>(</td>
          <td class="paramtype">ProblemT &amp;&#160;</td>
          <td class="paramname"><em>problem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>shrink</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00054">54</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a28001ad176039adccb83869d0b0867f8" name="a28001ad176039adccb83869d0b0867f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28001ad176039adccb83869d0b0867f8">&#9670;&#160;</a></span>deactivateVariable()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::deactivateVariable </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Remove the i-th example from the problem. </p>

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00189">189</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

<p class="reference">References <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

</div>
</div>
<a id="a123fe7062f93d420c0e0350500791bfa" name="a123fe7062f93d420c0e0350500791bfa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a123fe7062f93d420c0e0350500791bfa">&#9670;&#160;</a></span>flipCoordinates()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::flipCoordinates </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>j</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>swap indizes (i,j) </p>

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00222">222</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

</div>
</div>
<a id="abb019d7a60a63b0555442f946fc346e3" name="abb019d7a60a63b0555442f946fc346e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb019d7a60a63b0555442f946fc346e3">&#9670;&#160;</a></span>scaleBoxConstraints()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::scaleBoxConstraints </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>factor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>variableScalingFactor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Scales all box constraints by a constant factor and adapts the solution by scaling it by the same factor. </p>

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00198">198</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

</div>
</div>
<a id="ad81b0fa8a8c66781fcfdc126c49cd27e" name="ad81b0fa8a8c66781fcfdc126c49cd27e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad81b0fa8a8c66781fcfdc126c49cd27e">&#9670;&#160;</a></span>setInitialSolution() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::setInitialSolution </td>
          <td>(</td>
          <td class="paramtype">RealVector const &amp;&#160;</td>
          <td class="paramname"><em>alpha</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Define the initial solution for the iterative solver. </p>
<p>This method can be used to warm-start the solver. It requires a feasible solution (alpha), for which it computes the gradient of the dual objective function. Note that this is a quadratic time operation in the number of non-zero coefficients. </p>

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00167">167</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

<p class="reference">References <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#a6e718159c7a2ae9bb6e828792da068e3">shark::BoxBasedShrinkingStrategy&lt; Problem &gt;::setInitialSolution()</a>, and <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

</div>
</div>
<a id="a6e718159c7a2ae9bb6e828792da068e3" name="a6e718159c7a2ae9bb6e828792da068e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e718159c7a2ae9bb6e828792da068e3">&#9670;&#160;</a></span>setInitialSolution() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::setInitialSolution </td>
          <td>(</td>
          <td class="paramtype">RealVector const &amp;&#160;</td>
          <td class="paramname"><em>alpha</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealVector const &amp;&#160;</td>
          <td class="paramname"><em>gradient</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">RealVector const &amp;&#160;</td>
          <td class="paramname"><em>gradientEdge</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Define the initial solution for the iterative solver. </p>
<p>This method can be used to warm-start the solver. It requires a feasible solution (alpha) and the corresponding gradient of the dual objective function. </p>

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00151">151</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

<p class="reference">References <a class="el" href="_exception_8h.html#a42a6a50e4d06c00d60fbca5333f40768">SIZE_CHECK</a>.</p>

<p class="reference">Referenced by <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#ad81b0fa8a8c66781fcfdc126c49cd27e">shark::BoxBasedShrinkingStrategy&lt; Problem &gt;::setInitialSolution()</a>.</p>

</div>
</div>
<a id="ab68691e44171a2cc4659c19c9a0125d6" name="ab68691e44171a2cc4659c19c9a0125d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab68691e44171a2cc4659c19c9a0125d6">&#9670;&#160;</a></span>setLinear()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::setLinear </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>newValue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>adapts the linear part of the problem and updates the internal data structures accordingly. </p>

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00215">215</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

</div>
</div>
<a id="af9a1833825c43ee5492fde78d85cf0c5" name="af9a1833825c43ee5492fde78d85cf0c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9a1833825c43ee5492fde78d85cf0c5">&#9670;&#160;</a></span>setShrinking()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::setShrinking </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>shrinking</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00140">140</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

<p class="reference">References <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#adff09578370110d58328cf69e965a5fe">shark::BoxBasedShrinkingStrategy&lt; Problem &gt;::unshrink()</a>.</p>

</div>
</div>
<a id="aaa20fc55d3f28d930e26ca577621c44d" name="aaa20fc55d3f28d930e26ca577621c44d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa20fc55d3f28d930e26ca577621c44d">&#9670;&#160;</a></span>shrink()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::shrink </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>epsilon</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00086">86</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

<p class="reference">References <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#adff09578370110d58328cf69e965a5fe">shark::BoxBasedShrinkingStrategy&lt; Problem &gt;::unshrink()</a>.</p>

</div>
</div>
<a id="adff09578370110d58328cf69e965a5fe" name="adff09578370110d58328cf69e965a5fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adff09578370110d58328cf69e965a5fe">&#9670;&#160;</a></span>unshrink()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::unshrink </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Unshrink the problem. </p>

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00114">114</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#af9a1833825c43ee5492fde78d85cf0c5">shark::BoxBasedShrinkingStrategy&lt; Problem &gt;::setShrinking()</a>, and <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html#aaa20fc55d3f28d930e26ca577621c44d">shark::BoxBasedShrinkingStrategy&lt; Problem &gt;::shrink()</a>.</p>

</div>
</div>
<a id="a1bddc03ff11fb5f104e2f1000c7b2093" name="a1bddc03ff11fb5f104e2f1000c7b2093"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1bddc03ff11fb5f104e2f1000c7b2093">&#9670;&#160;</a></span>updateSMO()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Problem &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="structshark_1_1_box_based_shrinking_strategy.html">shark::BoxBasedShrinkingStrategy</a>&lt; Problem &gt;::updateSMO </td>
          <td>(</td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::size_t&#160;</td>
          <td class="paramname"><em>j</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_box_based_shrinking_strategy_8h_source.html#l00073">73</a> of file <a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/shark/Algorithms/QP/<a class="el" href="_box_based_shrinking_strategy_8h_source.html">BoxBasedShrinkingStrategy.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
